/**
 * 
 */
package com.demo2do.strawberry.entity.startup.activity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Type;

import com.demo2do.strawberry.entity.investor.Investor;
import com.demo2do.strawberry.entity.startup.Startup;
import com.demo2do.strawberry.entity.user.profile.Profile;

/**
 * @author Downpour
 */
@Entity
@Table(name = "startup_meet")
public class Meet {
	
	@Id
	@GeneratedValue
	private Long id;
	
	private String phone;
	
	private String weixin;
	
	private String email;
	
	@Type(type = "text")
	private String message;
	
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	private Profile profile;
	
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	private Startup startup;
	
	private Date createTime;
	
	@Transient
	private Investor investor;

	/**
	 * The default constructor
	 */
	public Meet() {
		
	}
	
	/**
	 * initialize meet
	 * 
	 * @param startup
	 * @param profile
	 * @return
	 */
	public Meet initialize(Startup startup, Profile profile) {
		this.startup = startup;
		this.profile = profile;
		this.createTime = new Date();
		return this;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	
	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}
	
	/**
	 * @return the weixin
	 */
	public String getWeixin() {
		return weixin;
	}
	
	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}
	
	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}
	
	/**
	 * @return the profile
	 */
	public Profile getProfile() {
		return profile;
	}

	/**
	 * @return the startup
	 */
	public Startup getStartup() {
		return startup;
	}

	/**
	 * @return the createTime
	 */
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	 * @return the investor
	 */
	public Investor getInvestor() {
		return investor;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	/**
	 * @param weixin the weixin to set
	 */
	public void setWeixin(String weixin) {
		this.weixin = weixin;
	}
	
	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	
	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @param profile the profile to set
	 */
	public void setProfile(Profile profile) {
		this.profile = profile;
	}

	/**
	 * @param startup the startup to set
	 */
	public void setStartup(Startup startup) {
		this.startup = startup;
	}

	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * @param investor the investor to set
	 */
	public void setInvestor(Investor investor) {
		this.investor = investor;
	}
}
